package com.a.lib_base.base.viewmodel

import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import com.a.lib_network.bean.NetState

/**
 * 用于EasyHttp请求数据并返回状态
 * 避免在 ViewModel 中引用 View 或 Activity 上下文。
 * 记得初始化 owner
 * */
abstract class BaseNetStateViewModel : BaseOwnerViewModel() {
    protected val _liveData: MutableLiveData<NetState> by lazy { MutableLiveData() }

    val liveData: LiveData<NetState>
        get() = _liveData

}